//////////////////////////////////////////
//
//	FlexInc. 2011
//	http://www.loziosecchi.it/flex_inc
//	http://twitter.com/loziosecchi
//
//////////////////////////////////////////

package flexInc.spark.components
{
	import spark.components.ButtonBarButton;
	
	//--------------------------------------
	//  Styles
	//--------------------------------------
	
	/**
	 * A uint percent value used to change the component aspect
	 * depending on the tag recurrence.
	 */
	[Style(name="tagWeight", type="Number", inherit="yes")]

	//--------------------------------------
	//  Other metadata
	//--------------------------------------
	
	[IconFile("assets/icons/TagCloud.png")]

	/**
	 *  The TagCloudButton class defines the custom item renderer
	 *  used by the TagCloud control. 
	 *  This item renderer is used in the TagCloudSkin class, 
	 *  the default skin for the TagCloud.
	 *
	 *  @see flexInc.spark.components.TagCloud
	 *  @see flexInc.spark.skins.TagCloudSkin
	 */
	public class TagCloudButton extends ButtonBarButton
	{
		/**
		 * Constructor
		 */
		public function TagCloudButton()
		{
			super();
		}
		
		/**
		 * @private
		 */
		protected var _weight:Number;
		
		/**
		 * The weight of the item renderer. It is used
		 * to differentiate the aspect of the TagCloudButton
		 * in the TabBar
		 */
		public function get weight():Number
		{
			return _weight;
		}
		
		/**
		 * @private
		 */
		public function set weight(value:Number):void
		{
			_weight = value;
			setStyle("tagWeight", value);
		}
	}
}